<div>
<?php
$this->addScript(array(
	'/js/editTranslation.js'
));
$ll = $this->getData('language_list');
$n = count($ll) + 1;
$w = floor(100/$n);
?>
	<h1><?=$this->T('Manage translations')?></h1>
	<div class="accordion" id="translation">
		<?php foreach ($this->getData('translation') as $block => $b) {
		$block_id =  'block-' . strtoupper(preg_replace(array('/[\W]+/'), '_', $block));
		?>
		  <div class="accordion-group">
		    <div class="accordion-heading">
		      <a class="accordion-toggle" data-toggle="collapse" data-parent="#atranslation" href="#<?=$block_id?>">
		        <?=$this->T('Block')?> «<?=empty($block) ? '-' : $block ?>»
		      </a>
		    </div>
		    <div block="<?=$block?>" id="<?=$block_id?>" class="accordion-body collapse">
				<div class="accordion-inner">
					<table class="table">
						<thead>
							<tr>
								<th width="<?=$w?>%"><?=$this->T('Key')?></th>
								<?php foreach ($ll as $k => $v) {?>
								<th width="<?=$w?>%"><?=$this->T($v)?></th>
								<?php } ?>
								<th></th>
							</tr>
						</thead>
						<tbody>
						<?php foreach ($b as $key => $v1) {
						
							?>
						<tr key="<?=$key?>">
							<td><?=$key?></td>
							<?php foreach ($ll as $l => $v) {?>
							<td class='editable' lang="<?=$l?>"><?=$v1[$l]?></td>
							<?php } ?>
							<td><widget 
								class="Tools"
								remove="translation/remove/<?=$block?>/<?=$key?>" />
						</td>
						</tr>
						<?php }?>
						</tbody>
					</table>
				</div>
			</div>
	  	</div>
		<?php }?>
 	</div>
</div>